import { Router } from '@fmfe/genesis-app';
import Container from './container.vue';
import Default from './view/default.vue';
import Login from './view/login.vue'

export const createRouter = () => {
    return new Router({
        mode: 'history',
        routes: [{
            path: '/',
            meta: {
                title:'E-MES',
                ssrname: 'e-mes-main'
            },
            redirect: '/default'
        }, {
            path: '/login',
            meta: {
                title:'E-MES',
                ssrname: 'e-mes-main'
            },
            component:Login
        }, {
            path: '/default',
            meta: {
                title:'E-MES',
                ssrname: 'e-mes-main'
            },
            component: Default,
            redirect: '/home',
            children: [{
                path: '/home',
                meta: {
                    title:'电梯制造执行系统',
                    ssrname: 'e-mes-home'
                },
                component: Container
            }, {
                path: '/about/*',
                meta: {
                    ssrname: 'e-mes-about'
                },
                component: Container
            }, {
                path: '/share/*',
                meta: {
                    ssrname: 'e-mes-share'
                },
                component: Container
            }]
            // Default页的二级路由 END
        }]
        // 一级路由 END
    });
};
